package com.hnkywl.sts.entity.organ;

import com.hnkywl.sts.entity.BaseEntity;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: SDE08
 * Date: 13-7-23
 * Time: 下午5:24
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "T_SYS_LJLS")
@Where(clause = "deleted!='1'")
public class LjLs extends BaseEntity {
    @Id
    @SequenceGenerator(name = "seqLjLs", allocationSize = 1, sequenceName = "SEQ_SYS_LJLS")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqLjLs")
    private Long id;

    @ManyToOne
    @JoinColumn(name="LJ_ID")
    private Lj lj;


    @OneToMany(fetch = FetchType.LAZY,cascade = CascadeType.ALL,mappedBy = "ljls",targetEntity = LjGys.class)
    private List<LjGys> ljGysList;

    /**
     * 状态
     */
    private String zt;

    /**
     * 已同步
     */
    private Boolean ytb=false;

    /**
     * 关联流程
     */
    @Basic
    @Column(name = "LC_ID")
    private String processInstanceId;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Lj getLj() {
        return lj;
    }

    public void setLj(Lj lj) {
        this.lj = lj;
    }

    public List<LjGys> getLjGysList() {
        return ljGysList;
    }

    public void setLjGysList(List<LjGys> ljGysList) {
        this.ljGysList = ljGysList;
    }

    public String getZt() {
        return zt;
    }

    public void setZt(String zt) {
        this.zt = zt;
    }

    public Boolean getYtb() {
        return ytb;
    }

    public void setYtb(Boolean ytb) {
        this.ytb = ytb;
    }

    public String getProcessInstanceId() {
        return processInstanceId;
    }

    public void setProcessInstanceId(String processInstanceId) {
        this.processInstanceId = processInstanceId;
    }
}
